<template>
    <CommonContainer title="客户信息">
        <el-descriptions v-if="customerInfo">
            <el-descriptions-item label="客户编号" v-if="customerInfo.customerDetailVo"><span class="goorder" @click="goCustomer(customerInfo.customerDetailVo.customerId)">{{ customerInfo.customerDetailVo.customerCode|filterNull }}</span></el-descriptions-item>
            <el-descriptions-item label="客户名称" v-if="customerInfo.customerDetailVo">{{ customerInfo.customerDetailVo.customerName|filterNull }}</el-descriptions-item>
            <el-descriptions-item label="业务类型" v-if="customerInfo.customerDetailVo">
                {{ customerInfo.customerDetailVo.businessScope|filterNull }}
            </el-descriptions-item>
            <el-descriptions-item label="客户等级" v-if="customerInfo.customerDetailVo">
                {{ customerInfo.customerDetailVo.customerLevel|filterNull }}
            </el-descriptions-item>
            <el-descriptions-item label="客户标签" v-if="customerInfo.customerDetailVo">
                {{ customerInfo.customerDetailVo.customerLabel|filterNull }}
            </el-descriptions-item>
            <el-descriptions-item label="业务担当姓名" v-if="customerInfo.orderInfoVo">{{ customerInfo.orderInfoVo.businessPersonName|filterNull }}</el-descriptions-item>
            <el-descriptions-item label="申请时间" v-if="customerInfo.orderInfoVo">{{ customerInfo.orderInfoVo.applyTime|filterNull }}</el-descriptions-item>
        </el-descriptions>
    </CommonContainer>
</template>

<script>
export default {
    components: {},
    dicts:['business_type','customer_level','customer_label'],
    props: {
        value: {
        type: Object,
        },
    },
    data() {
        return {

        }
    },
    computed:{
        customerInfo: {
            get() {
                return this.value;
                return this.useVModel.call(this);
            },
            set(val) {
                this.$emit("input", val);
            }, 
        },
    },
    methods: {
        goCustomer(id){
         
        if (this.Empty(id)) return;
        this.$router.push({
            name: 'memberDetail',
            query: {
                customerId: id
            }
        })
      },
    },
    mounted() {
        console.log(this);
    },

}
</script>

<style lang="scss" scoped>
.goorder{
    color:blue;
    cursor: pointer;
}
</style>
